package com.yxy.mapper;

import com.yxy.domain.po.Version;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface VersionMapper {
    /**
     * 获取最新版本信息
     * @return
     */
    @Select("select * from version order by release_date desc limit 1")
    Version getLatestVersion();

    /**
     * 插入版本信息
     * @param version
     */
    void insertVersion(Version version);

    /**
     * 查询所有版本信息
     * @return
     */
    @Select("select * from version")
    List<Version> selectAll();
}
